<?php

// the path to the module. the probably shouldn't be changed unless you rename the embed_videos folder(s)
define('image_upload_path', my_pligg_base . '/modules/image_upload/');

// the path for smarty / template lite plugins
define('image_upload_plugins_path', my_pligg_base . '/modules/image_upload/plugins');

// Image Base Dir
if (my_pligg_base == "")
{
	define('module_imageupload_basedir', $_SERVER['DOCUMENT_ROOT']."/");
} else {
	define('module_imageupload_basedir', $_SERVER['DOCUMENT_ROOT'].my_pligg_base."/");
}

// Configuration Settings
define('module_imageupload_debugmode', false);    					# Make this true to see what is happening behind the scenes.  Turn off for production environment.


define('module_imageupload_imagedir', 'images/');					# Name of your images directory; include trailing slash; must be writeables 
define('module_imageupload_gdversion', 2);							# Your GD version installed
define('module_imageupload_jpg_quality', 80);						# 1-100 (JPG Quality for resized images)
define('module_imageupload_use_thickbox', true);					# Use Thickbox for fullsize overlay?
define('module_imageupload_use_thumb', true);						# Show thumbnail in story (true) or fullsize (false)
define('module_imageupload_thumb_width', 100);						# Maximum thumbnail width
define('module_imageupload_thumb_height', 100);						# Maximum thumbnail height
define('module_imageupload_thumb_square', true);					# True to show thumbnails as squares (assuming thumb W = H), false to
																	# scale thumbnail to fit within thumb WxH space
define('module_imageupload_thumb_prefix', 'th_');					# NOT USED -- FUTURE USE
define('module_imageupload_fullsize_prefix', 'img_');				# Fullsize image filename prefix
define('module_imageupload_fullsize_maxtoggle', 'w');				# Fullsize image max toggle; 
																	# w (resize image if width is larger than fullsize width
																	# h (resize image if heighti s larger than fullsize height
define('module_imageupload_fullsize_width', 500);					# Fullsize image width (maximum)
define('module_imageupload_fullsize_height', 500);					# Fullsize image height (maximum)
define('module_imageupload_filename_field', 'link_field1');			# This should be link field you've enabled for photo uploads.


define('module_imageupload_legendtext', '<center><span style="font: normal 10px verdana, arial;">(click to enlarge)</span></center>');											# Legend text which appears below thumbnail


// Thumbnail Generator Settings (Do not change unless you have to)
define('module_imageupload_thumb_generator', image_upload_plugins_path.'/thumb.php');	# PHP Script to handle dynamic thumbnail creation
define('module_imageupload_thumb_generator_pre', '?img=');								# Image name supplied to script
define('module_imageupload_thumb_generator_post', "&w=".module_imageupload_thumb_width."&h=".module_imageupload_thumb_height);			# Image settings

// Styling
define('module_imageupload_preview_pre', '<img border="1" src="');						# Pre Styling for Thumbnail or fullsize
define('module_imageupload_preview_post', '" alt="" />');								# Post styling for thumbnail or fullsize
define('module_imageupload_img_css_pre', '<div style="width: '.module_imageupload_thumb_width.'px; margin: 5px 10px 10px 10px;">');																				# Pre CSS Styling
define('module_imageupload_img_css_post', '</div>');									# Post CSS Styling

// Thickbox
define('module_imageupload_thickbox_pre1', '<a href="'.module_imageupload_imagedir);	# Thickbox Pre 1 string
define('module_imageupload_thickbox_pre2', '" title="Photo" class="thickbox">');		# Thickbox Pre 2 string
define('module_imageupload_thickbox_post', '</a>');										# Thickbox Post string

// No Thickbox
define('module_imageupload_directlink_pre1', '<a href="'.module_imageupload_imagedir);	# Thickbox Pre 1 string
define('module_imageupload_directlink_pre2', '" title="Photo">');						# Thickbox Pre 2 string
define('module_imageupload_directlink_post', '</a>');									# Thickbox Post string



// Really don't touch anything past this line.
if (module_imageupload_use_thickbox)
{
	if(is_object($main_smarty)){
		$main_smarty->assign('load_thickbox', 1);
	}
}

if(is_object($main_smarty))
{
	$main_smarty->assign('image_upload_path', image_upload_path);
	$main_smarty->assign('image_upload_lang_conf', image_upload_lang_conf);
	$main_smarty->assign('image_upload_tpl_path', image_upload_tpl_path);

	$main_smarty->assign('module_imageupload_imagedir', module_imageupload_imagedir);
	$main_smarty->assign('module_imageupload_use_thickbox', module_imageupload_use_thickbox);
	$main_smarty->assign('module_imageupload_use_thumb', module_imageupload_use_thumb);
	$main_smarty->assign('module_imageupload_thumb_width', module_imageupload_thumb_width);
	$main_smarty->assign('module_imageupload_thumb_height', module_imageupload_thumb_height);
	$main_smarty->assign('module_imageupload_fullsize_width', module_imageupload_fullsize_width);
	$main_smarty->assign('module_imageupload_fullsize_height', module_imageupload_fullsize_height);
	$main_smarty->assign('module_imageupload_filename_field', module_imageupload_filename_field);

}


?>